
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemStorageRequest struct {

	AccessKey string `json:"access_key" form:"access_key"`

	Type string `json:"type" form:"type"`

	Name string `json:"name" form:"name"`

	Region string `json:"region" form:"region"`

	Acl string `json:"acl" form:"acl"`

	Domain string `json:"domain" form:"domain"`

	Cdn string `json:"cdn" form:"cdn"`

	Cname string `json:"cname" form:"cname"`

	IsSsl string `json:"is_ssl" form:"is_ssl"`

	Status string `json:"status" form:"status"`

	IsDelete string `json:"is_delete" form:"is_delete"`

	AddTime string `json:"add_time" form:"add_time"`

	UpdateTime string `json:"update_time" form:"update_time"`

}

func (r *SystemStorageRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemStorageRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"access_key": "required",

		"type": "required",

		"name": "required",

		"region": "required",

		"acl": "required",

		"domain": "required",

		"cdn": "required",

		"cname": "required",

		"is_ssl": "required",

		"status": "required",

		"is_delete": "required",

		"add_time": "required",

		"update_time": "required",

	}
}

func (r *SystemStorageRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemStorageRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemStorageRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
